package com.niiwoo.civet.user.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SMSTemplatePrefix {

    DEFAULT("", "默认"),
    CARD_NIU("cardNiu", "卡牛");

    private String prefix;

    private String thirdPartName;

    public String concatTpl(SMSTemplateKeyEnum tpl) {
        String value = tpl.getKey();
        if (this.getPrefix() != null && this.getPrefix().length() > 0) {
            return String.format("%s.%s", this.getPrefix(), value);
        } else {
            return value;
        }
    }

}
